// Warm color palette
$primary-color: #f59e0b;
$primary-dark: #d97706;
$primary-light: #fbbf24;
$secondary-color: #fcd34d;
$success-color: #10b981;
$warning-color: #f59e0b;
$danger-color: #ef4444;
$dark-color: #374151;
$gray-color: #6b7280;
$light-gray: #fef7f0;
$white: #ffffff;

// Shadows
$shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
$shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
$shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
$shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

.kitchen-page {
  background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 50%, #fbbf24 100%);
  min-height: 100vh;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  position: relative;
}

.kitchen-page .top-navbar,
.kitchen-page .welcome-section,
.kitchen-page .stats-section,
.kitchen-page .inventory-header,
.kitchen-page .food-list-container {
  position: relative;
  z-index: 1;
}

/* 顶部导航栏 */
.top-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: $shadow-sm;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.navbar-left {
  .app-title {
    font-size: 40px;
    font-weight: 700;
    color: $dark-color;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
  }
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
  
  .nav-icon {
    color: $gray-color;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px;
    border-radius: 8px;
    
    &:hover {
      color: $primary-color;
      background: rgba($primary-color, 0.1);
    }
  }
  
  .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, $primary-color 0%, $secondary-color 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    
    &:hover {
      transform: scale(1.05);
    }
    
    .avatar-text {
      color: white;
      font-size: 16px;
      font-weight: 600;
    }
  }
}

/* 欢迎区域 */
.welcome-section {
  padding: 32px;
  background: rgba(255, 255, 255, 0.85);
  margin: 24px;
  border-radius: 20px;
  box-shadow: $shadow-md;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  
  &::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba($primary-color, 0.1) 0%, rgba($secondary-color, 0.1) 100%);
    border-radius: 50%;
    pointer-events: none;
  }
}

.welcome-text {
  font-size: 56px;
  font-weight: 800;
  color: $dark-color;
  margin-bottom: 12px;
  display: block;
  position: relative;
  z-index: 1;
}

.date-text {
  color: $gray-color;
  font-size: 34px;
  line-height: 1.6;
  margin-bottom: 24px;
  display: block;
  position: relative;
  z-index: 1;
}

.highlight {
  color: $danger-color;
  font-weight: 700;
  background: rgba($danger-color, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
}

.add-food-btn {
  background: linear-gradient(135deg, $primary-color, $primary-dark);
  border: none;
  border-radius: 12px;
  padding: 20px 36px;
  font-size: 24px;
  font-weight: 600;
  color: white;
  box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.35);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  text-align: center;
  line-height: 1.2;
  width: 100%;
  
  // 确保按钮内容居中
  .at-button__text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    line-height: 1.2;
  }
  
  &::before {
    content: '+ ';
    font-size: 26px;
    font-weight: 700;
    margin-right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(245, 158, 11, 0.45);
  }
  
  &:active {
    transform: translateY(0);
  }
}

/* 统计卡片区域 */
.stats-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  padding: 24px;
  box-shadow: $shadow-md;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: all 0.3s ease;
  }
  
  &.total::before {
    background: linear-gradient(90deg, $primary-color, $primary-light);
  }
  
  &.expiring::before {
    background: linear-gradient(90deg, $danger-color, #f87171);
  }
  
  &.consumption::before {
    background: linear-gradient(90deg, $success-color, #34d399);
  }
  
  &:hover {
    transform: translateY(-4px);
    box-shadow: $shadow-lg;
    
    &.total {
      border-color: rgba($primary-color, 0.2);
    }
    
    &.expiring {
      border-color: rgba($danger-color, 0.2);
    }
    
    &.consumption {
      border-color: rgba($success-color, 0.2);
    }
  }
}

.stat-icon {
  font-size: 28px;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  
  .total & {
    background: rgba($primary-color, 0.1);
  }
  
  .expiring & {
    background: rgba($danger-color, 0.1);
  }
  
  .consumption & {
    background: rgba($success-color, 0.1);
  }
}

.stat-info {
  flex: 1;
}

.stat-label {
  font-size: 24px;
  color: $gray-color;
  margin-bottom: 6px;
  display: block;
  font-weight: 500;
}

.stat-value {
  font-size: 48px;
  font-weight: 800;
  color: $dark-color;
  margin-bottom: 6px;
  display: block;
  
  .total & {
    color: $primary-color;
  }
  
  .expiring & {
    color: $danger-color;
  }
  
  .consumption & {
    color: $success-color;
  }
}

.stat-trend {
  font-size: 22px;
  color: $gray-color;
  display: block;
  font-weight: 500;
}


/* 库存标题区域 */
.inventory-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 24px;
  margin-bottom: 24px;
}

.inventory-title-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inventory-title {
  font-size: 36px;
  font-weight: 700;
  color: $dark-color;
  display: flex;
  align-items: center;
  gap: 12px;
  
  &::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 4px;
    background: linear-gradient(90deg, $primary-color, $secondary-color);
    border-radius: 2px;
  }
}

.search-button {
  background: linear-gradient(135deg, $primary-color, $primary-dark);
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 18px;
  font-weight: 600;
  color: white;
  box-shadow: 0 2px 8px 0 rgba($primary-color, 0.25);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  
  &:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px 0 rgba($primary-color, 0.35);
  }
  
  &:active {
    transform: translateY(0);
  }
  
  .search-icon {
    color: white;
  }
  
  .at-button__text {
    color: white;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
}

.filter-controls {
  display: flex;
  gap: 12px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  box-shadow: $shadow-sm;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  backdrop-filter: blur(10px);
  
  &:hover {
    box-shadow: $shadow-md;
    border-color: rgba($primary-color, 0.2);
    
    .filter-text {
      color: $primary-color;
    }
  }
}

.filter-text {
  font-size: 22px;
  color: $gray-color;
  font-weight: 500;
  transition: color 0.2s ease;
}

/* 食材网格 */
.food-list-container {
  padding: 0 24px 100px 24px;
  height: calc(100vh - 400px);
  overflow-y: auto;
  
  &::-webkit-scrollbar {
    width: 8px;
  }
  
  &::-webkit-scrollbar-track {
    background: transparent;
  }
  
  &::-webkit-scrollbar-thumb {
    background: rgba($gray-color, 0.3);
    border-radius: 4px;
    
    &:hover {
      background: rgba($gray-color, 0.5);
    }
  }
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* 食材卡片 */
.food-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: $shadow-md;
  transition: all 0.3s ease;
  position: relative;
  border: 2px solid transparent;
  backdrop-filter: blur(10px);
  
  &:hover {
    transform: translateY(-8px);
    box-shadow: $shadow-xl;
    
    &.normal {
      border-color: rgba($success-color, 0.3);
    }
    
    &.low {
      border-color: rgba($warning-color, 0.3);
    }
    
    &.expiring {
      border-color: rgba($danger-color, 0.3);
    }
    
    .delete-button-corner {
      opacity: 1;
      transform: scale(1);
    }
  }
}

/* 右上角删除按钮 */
.delete-button-corner {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba($danger-color, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  
  &:hover {
    background: $danger-color;
    transform: scale(1.1);
  }
  
  &:active {
    transform: scale(0.95);
  }
  
  .delete-icon {
    color: white;
    font-weight: bold;
  }
}

/* 可点击的卡片内容区域 */
.food-card-content {
  cursor: pointer;
  transition: all 0.2s ease;
  
  &:hover {
    background: rgba($primary-color, 0.02);
  }
  
  &:active {
    background: rgba($primary-color, 0.05);
  }
}

/* 状态标签 */
.status-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 16px;
  border-radius: 24px;
  z-index: 10;
  backdrop-filter: blur(10px);
  font-weight: 600;
  box-shadow: $shadow-md;
  display: flex;
  align-items: center;
  justify-content: center;
  
  &.expiring {
    background: rgba($danger-color, 0.9);
  }
  
  &.low {
    background: rgba($warning-color, 0.9);
  }
  
.status-text {
    color: white;
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1;
  }
}

/* 食材图片 */
.food-image-container {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
  background: $light-gray;
}

.food-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.food-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba($primary-color, 0.1), rgba($secondary-color, 0.1));
  transition: all 0.3s ease;
}

.food-emoji {
  font-size: 48px;
  margin-bottom: 8px;
  display: block;
}

.food-placeholder-text {
  font-size: 26px;
  font-weight: 600;
  color: $dark-color;
  text-align: center;
  line-height: 1.2;
}

.food-card:hover .food-image {
  transform: scale(1.08);
}

.food-card:hover .food-image-placeholder {
  background: linear-gradient(135deg, rgba($primary-color, 0.2), rgba($secondary-color, 0.2));
  transform: scale(1.05);
}

/* 食材信息 */
.food-info {
  padding: 24px;
}

.food-name {
  font-size: 72px;
  font-weight: 700;
  color: $dark-color;
  margin-bottom: 16px;
  display: block;
}

.food-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba($gray-color, 0.1);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba($gray-color, 0.05);
  border-radius: 8px;
  transition: all 0.2s ease;
  
  &:hover {
    background: rgba($primary-color, 0.1);
    transform: translateX(4px);
  }
}

.meta-icon {
  font-size: 16px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba($primary-color, 0.1);
}

.meta-text {
  font-size: 24px;
  color: $gray-color;
  font-weight: 500;
  flex: 1;
}

/* 剩余量区域 */
.quantity-section {
  margin-bottom: 20px;
}

.quantity-label {
  font-size: 23px;
  color: $gray-color;
  margin-bottom: 10px;
  display: block;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quantity-bar {
  width: 100%;
  height: 8px;
  background: rgba($gray-color, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.quantity-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
  
  &::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    animation: shimmer 2s infinite;
  }
  
  &.normal {
    background: linear-gradient(90deg, $success-color, #34d399);
  }
  
  &.low {
    background: linear-gradient(90deg, $warning-color, #fbbf24);
  }
  
  &.expiring {
    background: linear-gradient(90deg, $danger-color, #f87171);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.quantity-text {
  font-size: 26px;
  color: $dark-color;
  font-weight: 700;
}

/* 食材操作按钮区域 */
.food-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba($gray-color, 0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.use-food-btn {
  width: 100%;
  height: 56px;
  border-radius: 14px;
  font-size: 24px;
  font-weight: 600;
  background: linear-gradient(135deg, $primary-color, $primary-dark);
  border: none;
  color: white;
  box-shadow: 0 2px 8px 0 rgba($primary-color, 0.25);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 24px;
  
  &:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px 0 rgba($primary-color, 0.35);
  }
  
  &:active {
    transform: translateY(0);
  }
  
  .at-button__text {
    color: white;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
  }
}

.delete-food-btn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  background: rgba($danger-color, 0.1);
  border: 2px solid rgba($danger-color, 0.3);
  color: $danger-color;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 20px;
  gap: 8px;
  
  &:hover {
    background: rgba($danger-color, 0.15);
    border-color: rgba($danger-color, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px 0 rgba($danger-color, 0.2);
  }
  
  &:active {
    transform: translateY(0);
    background: rgba($danger-color, 0.2);
  }
  
  .at-button__text {
    color: $danger-color;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.2;
  }
  
  .delete-btn-icon {
    color: $danger-color;
    font-size: 16px;
  }
}


/* 添加食材卡片 */
.add-food-card {
  background: linear-gradient(135deg, rgba($primary-color, 0.1), rgba($secondary-color, 0.1));
  border: 2px dashed rgba($primary-color, 0.3);
  border-radius: 20px;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 380px;
  
  &:hover {
    transform: translateY(-8px);
    box-shadow: $shadow-lg;
    background: linear-gradient(135deg, rgba($primary-color, 0.15), rgba($secondary-color, 0.15));
    border-color: rgba($primary-color, 0.5);
    
    .add-icon {
      transform: rotate(90deg);
      background: rgba($primary-color, 0.2);
    }
  }
}

.add-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba($primary-color, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: $primary-color;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  font-weight: 300;
}

.add-text {
  color: $dark-color;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}

.add-subtext {
  color: $gray-color;
  font-size: 14px;
  line-height: 1.5;
  display: block;
  max-width: 200px;
}

/* 添加食材浮层 */
.add-food-modal {
  z-index: 1000;
  
  .at-float-layout__container {
    border-radius: 20px 20px 0 0;
    max-height: 80vh;
    overflow-y: auto;
  }
  
  .at-float-layout__header {
    background: linear-gradient(135deg, $primary-color, $primary-dark);
    color: white;
    padding: 24px;
    font-size: 20px;
    font-weight: 700;
  }
  
  .at-float-layout__body {
    padding: 0;
    background: $white;
  }
}

/* 表单样式 */
.add-form {
  padding: 24px;
  background: $white;
  min-height: 400px;
}

.form-field {
  margin-bottom: 24px;
}

.field-label {
  display: block;
  color: $dark-color;
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 32px;
  
  &.required {
    position: relative;
    
    &::after {
      content: '';
      position: absolute;
      top: 0;
      right: -8px;
      width: 8px;
      height: 8px;
      background: $danger-color;
      border-radius: 50%;
      margin-left: 4px;
    }
  }
}

.required-field {
  border-color: rgba($danger-color, 0.3) !important;
  
  &:focus {
    border-color: $primary-color !important;
    box-shadow: 0 0 0 4px rgba($primary-color, 0.1) !important;
  }
  
  &:empty {
    border-color: rgba($danger-color, 0.5) !important;
  }
}

.form-field .at-input {
  border: 2px solid rgba($gray-color, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  transition: all 0.2s ease;
  background: $white;
  
  &:focus-within {
    border-color: $primary-color;
    box-shadow: 0 0 0 4px rgba($primary-color, 0.1);
  }
}

.form-field .at-input__container {
  border: none;
  padding: 0;
}

.form-field .at-input__input {
  color: $dark-color;
  font-size: 20px;
  padding: 8px 0;
}

.native-input {
  width: 100% !important;
  border: 2px solid rgba($gray-color, 0.2) !important;
  border-radius: 16px !important;
  padding: 24px 28px !important;
  font-size: 28px !important;
  color: $dark-color !important;
  background: $white !important;
  transition: all 0.2s ease !important;
  min-height: 72px !important;
  height: 72px !important;
  line-height: 1.4 !important;
  box-sizing: border-box !important;
  
  &:focus {
    border-color: $primary-color !important;
    box-shadow: 0 0 0 4px rgba($primary-color, 0.1) !important;
    outline: none !important;
    
    &::placeholder {
      opacity: 0;
    }
  }
  
  &::placeholder {
    color: rgba($gray-color, 0.6);
    transition: opacity 0.2s ease;
    font-size: 28px;
  }
  
  // 当输入框有值时隐藏placeholder
  &:not(:placeholder-shown)::placeholder {
    opacity: 0;
  }
}

/* 输入框与选择器组合样式 */
.input-with-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  
  .native-input {
    flex: 1;
  }
}

.selector-button {
  background: linear-gradient(135deg, $primary-color, $primary-dark);
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px 0 rgba($primary-color, 0.25);
  flex-shrink: 0;
  
  &:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px 0 rgba($primary-color, 0.35);
  }
  
  &:active {
    transform: translateY(0);
  }
}

.selector-button-text {
  color: white;
  font-size: 25px;
  font-weight: 600;
  white-space: nowrap;
}

.form-input {
  margin-bottom: 24px;
  
  .at-input {
    border-radius: 12px;
    border: 2px solid rgba($gray-color, 0.2);
    padding: 12px 16px;
    transition: all 0.2s ease;
    
    &:focus {
      border-color: $primary-color;
      box-shadow: 0 0 0 4px rgba($primary-color, 0.1);
    }
  }
  
  .at-input__title {
    color: $dark-color;
    font-weight: 600;
    margin-bottom: 8px;
  }
}

.form-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

.form-button {
  flex: 1;
  border-radius: 12px;
  padding: 18px 24px;
  font-size: 20px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  
  &.cancel {
    background: rgba($gray-color, 0.1);
    border: none;
    color: $gray-color;
    
    &:hover {
      background: rgba($gray-color, 0.2);
    }
  }
  
  &.confirm {
    background: linear-gradient(135deg, $primary-color, $primary-dark);
    border: none;
    color: white;
    box-shadow: 0 4px 14px 0 rgba($primary-color, 0.25);
    
    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px 0 rgba($primary-color, 0.35);
    }
  }
  
  &.delete-btn {
    background: linear-gradient(135deg, $danger-color, #dc2626);
    border: none;
    color: white;
    box-shadow: 0 4px 14px 0 rgba($danger-color, 0.25);
    
    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px 0 rgba($danger-color, 0.35);
    }
    
    &:active {
      transform: translateY(0);
    }
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .stats-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .food-grid {
    grid-template-columns: 1fr;
  }
  
  .inventory-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .filter-controls {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
    
    &::-webkit-scrollbar {
      height: 4px;
    }
    
    &::-webkit-scrollbar-thumb {
      background: rgba($gray-color, 0.3);
      border-radius: 2px;
    }
  }
  
  .welcome-section {
    margin: 16px;
    padding: 24px;
  }
  
  .welcome-text {
    font-size: 26px;
  }
  
  .food-list-container {
    padding: 0 16px 100px 16px;
  }
}

@media (max-width: 480px) {
  .top-navbar {
    padding: 12px 16px;
  }
  
  .navbar-left .app-title {
    font-size: 20px;
    
    &::before {
      font-size: 24px;
    }
  }
  
  .navbar-right {
    gap: 12px;
    
    .user-avatar {
      width: 36px;
      height: 36px;
    }
  }
  
  .stats-section {
    padding: 0 16px;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
  
  .stat-value {
    font-size: 24px;
  }
  
  .food-card {
    border-radius: 16px;
  }
  
  .food-info {
    padding: 20px;
  }
  
  .food-name {
    font-size: 30px;
  }
}

/* 加载动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.food-card {
  animation: fadeIn 0.5s ease-out;
}

.food-card:nth-child(1) { animation-delay: 0.05s; }
.food-card:nth-child(2) { animation-delay: 0.1s; }
.food-card:nth-child(3) { animation-delay: 0.15s; }
.food-card:nth-child(4) { animation-delay: 0.2s; }
.food-card:nth-child(5) { animation-delay: 0.25s; }
.food-card:nth-child(6) { animation-delay: 0.3s; }
.food-card:nth-child(7) { animation-delay: 0.35s; }
.food-card:nth-child(8) { animation-delay: 0.4s; }
.food-card:nth-child(9) { animation-delay: 0.45s; }
.food-card:nth-child(10) { animation-delay: 0.5s; }

/* 选择器字段样式 */
.selector-field {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  border: 2px solid rgba($gray-color, 0.2) !important;
  border-radius: 16px !important;
  padding: 24px 28px !important;
  background: $white !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  min-height: 72px !important;
  height: 72px !important;
  box-sizing: border-box !important;
  
  &:hover {
    border-color: rgba($primary-color, 0.4) !important;
  }
  
  &:active {
    border-color: $primary-color !important;
    box-shadow: 0 0 0 4px rgba($primary-color, 0.1) !important;
  }
  
  // iOS style enhancements
  &.ios-style {
    border-radius: 16px !important;
    border: 2px solid rgba($gray-color, 0.2) !important;
    background: $white !important;
    box-shadow: none !important;
    
    &:hover {
      border-color: rgba($primary-color, 0.4) !important;
    }
    
    &:active {
      border-color: $primary-color !important;
      box-shadow: 0 0 0 4px rgba($primary-color, 0.1) !important;
    }
  }
}

.selector-text {
  font-size: 28px !important;
  color: rgba($gray-color, 0.6) !important;
  flex: 1 !important;
  line-height: 1.4 !important;
  text-align: left !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  
  &.selected {
    color: $dark-color !important;
    font-weight: 500 !important;
  }
  
  // iOS style enhancements
  &.ios-style {
    font-size: 28px !important;
    font-weight: 400 !important;
    color: rgba($gray-color, 0.7) !important;
    
    &.selected {
      color: $dark-color !important;
      font-weight: 500 !important;
    }
  }
}

.chevron-icon {
  font-size: 28px;
  color: $gray-color;
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.selector-field:hover .chevron-icon {
  color: $primary-color;
  transform: scale(1.1);
}

/* 选择器模态框样式 */
.selector-modal {
  z-index: 1001;
  
  .at-float-layout__container {
    border-radius: 20px 20px 0 0;
    max-height: 70vh;
    overflow: hidden;
  }
  
  .at-float-layout__header {
    background: linear-gradient(135deg, $primary-color, $primary-dark);
    color: white;
    padding: 20px 24px;
    font-size: 18px;
    font-weight: 700;
  }
  
  .at-float-layout__body {
    padding: 0;
    background: $white;
    height: 100%;
  }
}

.selector-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 60vh;
}

/* 搜索栏样式 */
.selector-content .at-search-bar {
  padding: 16px 24px;
  background: $white;
  border-bottom: 1px solid rgba($gray-color, 0.1);
  
  .at-search-bar__input-cnt {
    border: 2px solid rgba($gray-color, 0.2);
    border-radius: 12px;
    background: $white;
    
    &:focus-within {
      border-color: $primary-color;
      box-shadow: 0 0 0 4px rgba($primary-color, 0.1);
    }
  }
  
  .at-search-bar__input {
    font-size: 16px;
    color: $dark-color;
    
    &::placeholder {
      color: rgba($gray-color, 0.6);
    }
  }
  
  .at-search-bar__action {
    background: $primary-color;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    padding: 8px 16px;
    margin-left: 8px;
    transition: all 0.2s ease;
    
    &:hover {
      background: $primary-dark;
    }
  }
}

/* 选项列表样式 */
.options-list {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
  
  &::-webkit-scrollbar {
    width: 6px;
  }
  
  &::-webkit-scrollbar-track {
    background: transparent;
  }
  
  &::-webkit-scrollbar-thumb {
    background: rgba($gray-color, 0.3);
    border-radius: 3px;
    
    &:hover {
      background: rgba($gray-color, 0.5);
    }
  }
}

.option-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px 28px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba($gray-color, 0.05);
  min-height: 88px;
  
  &:hover {
    background: rgba($primary-color, 0.05);
    
    .option-name {
      color: $primary-color;
    }
  }
  
  &:active {
    background: rgba($primary-color, 0.1);
  }
  
  &:last-child {
    border-bottom: none;
  }
  
  // 排序选择器特殊样式 - 无emoji，文本居中
  &.sort-option {
    justify-content: space-between;
    
    .option-info {
      flex: 1;
      text-align: center;
      align-items: center;
    }
    
    .option-name {
      text-align: center;
      font-size: 32px;
      font-weight: 600;
    }
    
    .option-category {
      text-align: center;
      font-size: 28px;
      color: $gray-color;
    }
  }
}

.option-emoji {
  font-size: 32px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba($primary-color, 0.1);
  border-radius: 12px;
  flex-shrink: 0;
}

.option-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  text-align: left;
  align-items: flex-start;
}

.option-name {
  font-size: 40px;
  font-weight: 600;
  color: $dark-color;
  transition: color 0.2s ease;
  line-height: 1.3;
  width: 100%;
  text-align: left;
  margin: 0;
  padding: 0;
}

.option-category {
  font-size: 36px;
  color: $gray-color;
  font-weight: 500;
  line-height: 1.2;
  width: 100%;
  text-align: left;
  margin: 0;
  padding: 0;
}

/* 单位选择器特殊样式 */
.selector-modal .options-list .option-item {
  justify-content: flex-start;
  
  .option-name {
    font-size: 28px;
    font-weight: 500;
    padding: 12px 20px;
    background: rgba($primary-color, 0.05);
    border-radius: 8px;
    min-width: 80px;
    text-align: center;
    transition: all 0.2s ease;
  }
  
  &:hover .option-name {
    background: rgba($primary-color, 0.1);
    color: $primary-color;
    transform: scale(1.05);
  }
}

/* 日期选择器样式增强 */
.form-field .selector-field {
  position: relative;
  
  .at-icon {
    color: $primary-color;
    opacity: 0.7;
    transition: all 0.2s ease;
  }
  
  &:hover .at-icon {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Picker组件样式覆盖 */
.form-field picker {
  width: 100%;
  
  .selector-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 2px solid rgba($gray-color, 0.2);
    border-radius: 16px;
    padding: 24px 28px;
    background: $white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 72px;
    
    &:hover {
      border-color: rgba($primary-color, 0.4);
    }
    
    &:active {
      border-color: $primary-color;
      box-shadow: 0 0 0 4px rgba($primary-color, 0.1);
    }
    
    .selector-text {
      font-size: 28px;
      color: rgba($gray-color, 0.6);
      flex: 1;
      line-height: 1.4;
      
      &.selected {
        color: $dark-color;
        font-weight: 500;
      }
    }
    
    .chevron-icon {
      font-size: 20px;
      color: $gray-color;
      margin-left: 8px;
      transition: transform 0.2s ease;
    }
  }
  
  &:hover .selector-field .chevron-icon {
    color: $primary-color;
    transform: scale(1.1);
  }
}

/* 表单字段动画 */
.form-field {
  animation: slideInUp 0.3s ease-out;
}

.form-field:nth-child(1) { animation-delay: 0.05s; }
.form-field:nth-child(2) { animation-delay: 0.1s; }
.form-field:nth-child(3) { animation-delay: 0.15s; }
.form-field:nth-child(4) { animation-delay: 0.2s; }
.form-field:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 选择器模态框动画 */
.selector-modal .at-float-layout__container {
  animation: slideInFromBottom 0.3s ease-out;
}

@keyframes slideInFromBottom {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* 选项项目动画 */
.option-item {
  animation: fadeInScale 0.2s ease-out;
}

.option-item:nth-child(1) { animation-delay: 0.02s; }
.option-item:nth-child(2) { animation-delay: 0.04s; }
.option-item:nth-child(3) { animation-delay: 0.06s; }
.option-item:nth-child(4) { animation-delay: 0.08s; }
.option-item:nth-child(5) { animation-delay: 0.1s; }
.option-item:nth-child(6) { animation-delay: 0.12s; }
.option-item:nth-child(7) { animation-delay: 0.14s; }
.option-item:nth-child(8) { animation-delay: 0.16s; }

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 响应式选择器样式 */
@media (max-width: 768px) {
  .selector-modal .at-float-layout__container {
    max-height: 80vh;
  }
  
  .option-item {
    padding: 14px 20px;
  }
  
  .option-emoji {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  
  .option-name {
    font-size: 15px;
  }
  
  .option-category {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .selector-content .at-search-bar {
    padding: 12px 16px;
  }
  
  .option-item {
    padding: 12px 16px;
    gap: 12px;
  }
  
  .option-emoji {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  
  .selector-field {
    padding: 10px 14px;
    min-height: 44px;
  }
  
  .selector-text {
    font-size: 15px;
  }
}

/* 底部操作按钮样式 - 改进版 */
.bottom-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
  backdrop-filter: blur(20px);
  padding: 24px 28px 32px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  box-shadow: 0 -8px 32px 0 rgba(0, 0, 0, 0.12), 0 -2px 8px 0 rgba(0, 0, 0, 0.08);
  z-index: 50;
  border-top: 1px solid rgba($primary-color, 0.15);
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, $primary-color, $secondary-color, $primary-color);
    opacity: 0.6;
  }
}

.action-button {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  line-height: 1.3;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  
  // 光泽效果
  &::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    transform: rotate(-45deg);
    transition: all 0.6s ease;
    opacity: 0;
  }
  
  &:hover::before {
    opacity: 1;
    transform: rotate(-45deg) translate(50%, 50%);
  }
  
  // 按钮文字样式
  .at-button__text {
    color: white !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
    line-height: 1.2;
  }
  
  // 圆形按钮样式
  &.circular-btn {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    padding: 0;
    min-height: auto;
    flex: none;
    
    .at-button__text {
      font-size: 14px !important;
      line-height: 1.1;
      font-weight: 600 !important;
    }
    
    .button-icon {
      font-size: 16px;
      margin-bottom: 2px;
    }
  }
  
  // 主要添加按钮 - 更大的圆形
  &.main-add-btn {
    width: 90px;
    height: 90px;
    order: 0; // 确保在中间位置
    
    .at-button__text {
      font-size: 15px !important;
      font-weight: 700 !important;
    }
    
    .button-icon {
      font-size: 16px;
      margin-bottom: 3px;
    }
  }
  
  &.export-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    color: white;
    box-shadow: 
      0 8px 24px 0 rgba(16, 185, 129, 0.4),
      0 4px 12px 0 rgba(16, 185, 129, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    &:hover {
      transform: translateY(-4px) scale(1.02);
      box-shadow: 
        0 12px 32px 0 rgba(16, 185, 129, 0.5),
        0 6px 16px 0 rgba(16, 185, 129, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
      border-color: rgba(16, 185, 129, 0.4);
    }
    
    &:active {
      transform: translateY(-2px) scale(1.01);
      box-shadow: 
        0 6px 20px 0 rgba(16, 185, 129, 0.4),
        0 3px 8px 0 rgba(16, 185, 129, 0.3);
    }
  }
  
  &.statistics-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
    color: white;
    box-shadow: 
      0 8px 24px 0 rgba(139, 92, 246, 0.4),
      0 4px 12px 0 rgba(139, 92, 246, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    &:hover {
      transform: translateY(-4px) scale(1.02);
      box-shadow: 
        0 12px 32px 0 rgba(139, 92, 246, 0.5),
        0 6px 16px 0 rgba(139, 92, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
      border-color: rgba(139, 92, 246, 0.4);
    }
    
    &:active {
      transform: translateY(-2px) scale(1.01);
      box-shadow: 
        0 6px 20px 0 rgba(139, 92, 246, 0.4),
        0 3px 8px 0 rgba(139, 92, 246, 0.3);
    }
  }
  
  &.import-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    color: white;
    box-shadow: 
      0 8px 24px 0 rgba(59, 130, 246, 0.4),
      0 4px 12px 0 rgba(59, 130, 246, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    &:hover {
      transform: translateY(-4px) scale(1.02);
      box-shadow: 
        0 12px 32px 0 rgba(59, 130, 246, 0.5),
        0 6px 16px 0 rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
      border-color: rgba(59, 130, 246, 0.4);
    }
    
    &:active {
      transform: translateY(-2px) scale(1.01);
      box-shadow: 
        0 6px 20px 0 rgba(59, 130, 246, 0.4),
        0 3px 8px 0 rgba(59, 130, 246, 0.3);
    }
  }
  
  &.delete-all-btn {
    background: linear-gradient(135deg, $danger-color 0%, #dc2626 50%, #b91c1c 100%);
    color: white;
    box-shadow: 
      0 8px 24px 0 rgba($danger-color, 0.4),
      0 4px 12px 0 rgba($danger-color, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    &:hover {
      transform: translateY(-4px) scale(1.02);
      box-shadow: 
        0 12px 32px 0 rgba($danger-color, 0.5),
        0 6px 16px 0 rgba($danger-color, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
      border-color: rgba($danger-color, 0.4);
    }
    
    &:active {
      transform: translateY(-2px) scale(1.01);
      box-shadow: 
        0 6px 20px 0 rgba($danger-color, 0.4),
        0 3px 8px 0 rgba($danger-color, 0.3);
    }
  }
  
  // 主要添加按钮的特殊样式
  &.add-food-btn-bottom {
    background: linear-gradient(135deg, $primary-color 0%, $primary-dark 50%, #b45309 100%);
    color: white;
    box-shadow: 
      0 10px 30px 0 rgba($primary-color, 0.5),
      0 6px 16px 0 rgba($primary-color, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    &:hover {
      transform: translateY(-6px) scale(1.05);
      box-shadow: 
        0 15px 40px 0 rgba($primary-color, 0.6),
        0 8px 20px 0 rgba($primary-color, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
      border-color: rgba($primary-color, 0.4);
    }
    
    &:active {
      transform: translateY(-3px) scale(1.02);
      box-shadow: 
        0 8px 25px 0 rgba($primary-color, 0.5),
        0 4px 12px 0 rgba($primary-color, 0.4);
    }
  }
}

.button-icon {
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  margin-bottom: 4px;
  
  // 图标动画效果
  transition: all 0.3s ease;
  
  .action-button:hover & {
    transform: scale(1.1) rotate(5deg);
  }
  
  .export-btn:hover & {
    transform: scale(1.1) rotate(-5deg);
  }
  
  .delete-all-btn:hover & {
    transform: scale(1.1) rotate(10deg);
  }
}

/* 调整食材列表容器的底部padding，为底部按钮留出空间 */
.food-list-container {
  padding: 0 24px 120px 24px; /* 增加底部padding */
  height: calc(100vh - 400px);
  overflow-y: auto;
  
  &::-webkit-scrollbar {
    width: 8px;
  }
  
  &::-webkit-scrollbar-track {
    background: transparent;
  }
  
  &::-webkit-scrollbar-thumb {
    background: rgba($gray-color, 0.3);
    border-radius: 4px;
    
    &:hover {
      background: rgba($gray-color, 0.5);
    }
  }
}

/* 响应式设计 - 底部按钮 */
@media (max-width: 768px) {
  .bottom-actions {
    padding: 16px 20px;
    gap: 12px;
  }
  
  .action-button {
    padding: 16px 20px;
    font-size: 18px;
    border-radius: 14px;
  }
  
  .food-list-container {
    padding: 0 16px 110px 16px;
  }
}

@media (max-width: 480px) {
  .bottom-actions {
    padding: 14px 16px;
    gap: 10px;
  }
  
  .action-button {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 12px;
    
    .button-icon {
      font-size: 16px;
    }
  }
  
  .food-list-container {
    padding: 0 16px 100px 16px;
  }
}

/* 底部按钮动画 */
.bottom-actions {
  animation: slideInFromBottom 0.4s ease-out;
}

@keyframes slideInFromBottom {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.action-button {
  animation: fadeInScale 0.3s ease-out;
}

.action-button:nth-child(1) { animation-delay: 0.1s; }
.action-button:nth-child(2) { animation-delay: 0.2s; }

/* 搜索模态框特殊样式 */
.search-tips {
  padding: 32px 28px;
  text-align: center;
  background: rgba($primary-color, 0.02);
  margin: 16px;
  border-radius: 16px;
  border: 1px solid rgba($primary-color, 0.1);
}

.tips-title {
  font-size: 32px;
  font-weight: 700;
  color: $dark-color;
  margin-bottom: 24px;
  display: block;
}

.tips-item {
  font-size: 28px;
  color: $gray-color;
  margin-bottom: 16px;
  display: block;
  text-align: left;
  line-height: 1.4;
  
  &:last-child {
    margin-bottom: 0;
  }
}

.no-results {
  padding: 48px 28px;
  text-align: center;
  background: rgba($gray-color, 0.02);
  margin: 16px;
  border-radius: 16px;
}

.no-results-text {
  font-size: 32px;
  font-weight: 600;
  color: $gray-color;
  margin-bottom: 16px;
  display: block;
}

.no-results-hint {
  font-size: 28px;
  color: rgba($gray-color, 0.7);
  line-height: 1.4;
  display: block;
}

.status-indicator {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  
  &.normal {
    background: rgba($success-color, 0.1);
  }
  
  &.low {
    background: rgba($warning-color, 0.1);
  }
  
  &.expiring {
    background: rgba($danger-color, 0.1);
  }
}

.status-icon {
  font-size: 24px;
  line-height: 1;
}

/* 搜索结果项目特殊样式 */
.selector-modal .options-list .option-item {
  .option-name {
    font-size: 40px !important;
    font-weight: 600 !important;
    color: $dark-color !important;
    line-height: 1.3 !important;
  }
  
  .option-category {
    font-size: 32px !important;
    color: $gray-color !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
  }
  
  &:hover {
    background: rgba($primary-color, 0.05);
    transform: translateX(4px);
    
    .option-name {
      color: $primary-color !important;
    }
    
    .status-indicator {
      transform: scale(1.1);
    }
  }
  
  &:active {
    background: rgba($primary-color, 0.1);
    transform: translateX(2px);
  }
}

/* 搜索栏增强样式 */
.selector-modal .selector-content .at-search-bar {
  .at-search-bar__input-cnt {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba($gray-color, 0.15);
    transition: all 0.3s ease;
    
    &:focus-within {
      border-color: $primary-color;
      box-shadow: 0 0 0 4px rgba($primary-color, 0.1);
      background: $white;
    }
  }
  
  .at-search-bar__input {
    font-size: 28px;
    color: $dark-color;
    font-weight: 500;
    
    &::placeholder {
      color: rgba($gray-color, 0.6);
      font-size: 28px;
    }
  }
}

/* 搜索模态框动画 */
.selector-modal .search-tips,
.selector-modal .no-results {
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 搜索结果项目动画 */
.selector-modal .options-list .option-item {
  animation: slideInLeft 0.3s ease-out;
}

.selector-modal .options-list .option-item:nth-child(1) { animation-delay: 0.05s; }
.selector-modal .options-list .option-item:nth-child(2) { animation-delay: 0.1s; }
.selector-modal .options-list .option-item:nth-child(3) { animation-delay: 0.15s; }
.selector-modal .options-list .option-item:nth-child(4) { animation-delay: 0.2s; }
.selector-modal .options-list .option-item:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
  .kitchen-page {
    background: #0f172a;
  }
  
  .top-navbar,
  .welcome-section,
  .stat-card,
  .filter-item,
  .food-card,
  .add-form,
  .selector-field,
  .selector-content .at-search-bar,
  .selector-modal .at-float-layout__body,
  .bottom-actions {
    background: #1e293b;
    color: #e2e8f0;
  }
  
  .navbar-left .app-title,
  .welcome-text,
  .stat-value,
  .inventory-title,
  .food-name,
  .option-name {
    color: #f1f5f9;
  }
  
  .date-text,
  .stat-label,
  .stat-trend,
  .filter-text,
  .meta-text,
  .quantity-label,
  .add-subtext,
  .option-category {
    color: #94a3b8;
  }
  
  .quantity-bar {
    background: rgba(148, 163, 184, 0.2);
  }
  
  .add-food-card {
    background: linear-gradient(135deg, rgba($primary-color, 0.2), rgba($secondary-color, 0.2));
    border-color: rgba($primary-color, 0.4);
  }
  
  .selector-field {
    border-color: rgba(148, 163, 184, 0.3);
    
    &:hover {
      border-color: rgba($primary-color, 0.6);
    }
  }
  
  .selector-text {
    color: #94a3b8;
    
    &.selected {
      color: #f1f5f9;
    }
  }
  
  .option-item {
    border-bottom-color: rgba(148, 163, 184, 0.1);
    
    &:hover {
      background: rgba($primary-color, 0.1);
    }
  }
  
  .option-emoji {
    background: rgba($primary-color, 0.2);
  }
  
  .bottom-actions {
    background: rgba(30, 41, 59, 0.95);
    border-top-color: rgba(148, 163, 184, 0.2);
  }
  
  .search-tips {
    background: rgba($primary-color, 0.1);
    border-color: rgba($primary-color, 0.2);
  }
  
  .tips-title {
    color: #f1f5f9;
  }
  
  .tips-item {
    color: #94a3b8;
  }
  
  .no-results {
    background: rgba(148, 163, 184, 0.1);
  }
  
  .no-results-text {
    color: #94a3b8;
  }
  
  .no-results-hint {
    color: rgba(148, 163, 184, 0.7);
  }
  
  .status-indicator {
    &.normal {
      background: rgba($success-color, 0.2);
    }
    
    &.low {
      background: rgba($warning-color, 0.2);
    }
    
    &.expiring {
      background: rgba($danger-color, 0.2);
    }
  }
}

/* 总食材模态框特殊样式 */
.total-ingredients-header {
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba($primary-color, 0.05), rgba($secondary-color, 0.05));
  border-bottom: 1px solid rgba($gray-color, 0.1);
  text-align: center;
}

.total-count {
  font-size: 24px;
  font-weight: 600;
  color: $primary-color;
  margin-bottom: 8px;
  display: block;
}

.total-description {
  font-size: 20px;
  color: $gray-color;
  font-weight: 500;
  display: block;
}
/* 总食材模态框特殊样式 */
.total-ingredients-header {
  padding: 32px 28px;
  background: linear-gradient(135deg, rgba($primary-color, 0.05), rgba($secondary-color, 0.05));
  border-bottom: 1px solid rgba($gray-color, 0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.total-count {
  font-size: 72px;
  font-weight: 800;
  color: $primary-color;
  line-height: 1;
  display: inline-block;
  margin: 0;
  letter-spacing: -2px;
}

.total-label {
  font-size: 32px;
  font-weight: 600;
  color: $dark-color;
  margin: 0;
  line-height: 1.2;
  margin-top: -8px;
}

.total-description {
  font-size: 24px;
  color: $gray-color;
  font-weight: 500;
  line-height: 1.4;
  margin: 8px 0 0 0;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

/* 总食材列表项目样式 */
.ingredient-item {
  .option-name {
    font-size: 40px !important;
    font-weight: 600 !important;
    color: $dark-color !important;
    line-height: 1.3 !important;
  }
  
  .option-category {
    font-size: 32px !important;
    color: $gray-color !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
  }
  
  &:hover {
    background: rgba($primary-color, 0.05);
    transform: translateX(4px);
    
    .option-name {
      color: $primary-color !important;
    }
    
    .status-indicator {
      transform: scale(1.1);
    }
  }
  
  &:active {
    background: rgba($primary-color, 0.1);
    transform: translateX(2px);
  }
}

/* 用户指南样式 */
.user-guide-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeInOverlay 0.4s ease-out;
}

@keyframes fadeInOverlay {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(8px);
  }
}

.user-guide-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
  border-radius: 24px;
  box-shadow: 
    0 20px 40px 0 rgba(0, 0, 0, 0.15),
    0 8px 16px 0 rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  position: relative;
  animation: slideInFromHelpIcon 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid rgba($primary-color, 0.2);
  
  &.closing {
    animation: slideOutToHelpIcon 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  }
}

@keyframes slideInFromHelpIcon {
  from {
    opacity: 0;
    transform: scale(0.1) translate(200px, -300px);
    transform-origin: top right;
  }
  to {
    opacity: 1;
    transform: scale(1) translate(0, 0);
    transform-origin: center center;
  }
}

@keyframes slideOutToHelpIcon {
  from {
    opacity: 1;
    transform: scale(1) translate(0, 0);
    transform-origin: center center;
  }
  to {
    opacity: 0;
    transform: scale(0.1) translate(200px, -300px);
    transform-origin: top right;
  }
}

.guide-header {
  background: linear-gradient(135deg, $primary-color 0%, $primary-dark 100%);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  
  &::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
  }
}

.guide-title {
  color: white;
  font-size: 26px;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
  line-height: 1.3;
  position: relative;
  z-index: 1;
}

.guide-close-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 1;
  
  &:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1) rotate(90deg);
  }
  
  &:active {
    transform: scale(0.95) rotate(90deg);
  }
  
  .close-icon {
    color: white;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  }
}

.guide-content {
  padding: 32px;
  max-height: 60vh;
  overflow-y: auto;
  
  &::-webkit-scrollbar {
    width: 8px;
  }
  
  &::-webkit-scrollbar-track {
    background: rgba($gray-color, 0.1);
    border-radius: 4px;
  }
  
  &::-webkit-scrollbar-thumb {
    background: rgba($primary-color, 0.3);
    border-radius: 4px;
    
    &:hover {
      background: rgba($primary-color, 0.5);
    }
  }
}

.guide-section {
  margin-bottom: 32px;
  padding: 24px;
  background: rgba($primary-color, 0.03);
  border-radius: 16px;
  border-left: 4px solid $primary-color;
  position: relative;
  transition: all 0.3s ease;
  
  &:hover {
    background: rgba($primary-color, 0.05);
    transform: translateX(4px);
    box-shadow: 0 4px 12px 0 rgba($primary-color, 0.1);
  }
  
  &:last-child {
    margin-bottom: 0;
  }
}

.guide-section-title {
  font-size: 26px;
  font-weight: 700;
  color: $dark-color;
  margin-bottom: 16px;
  display: block;
  line-height: 1.3;
  letter-spacing: 0.5px;
}

.guide-item {
  font-size: 26px;
  color: $gray-color;
  line-height: 1.6;
  margin-bottom: 12px;
  display: block;
  padding-left: 8px;
  position: relative;
  
  &:last-child {
    margin-bottom: 0;
  }
  
  &::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: $primary-color;
    border-radius: 50%;
  }
}

.guide-footer {
  margin-top: 32px;
  padding: 24px;
  background: linear-gradient(135deg, rgba($secondary-color, 0.1), rgba($primary-color, 0.1));
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba($primary-color, 0.2);
}

.guide-footer-text {
  font-size: 26px;
  color: $primary-dark;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.5px;
}

/* 响应式设计 - 用户指南 */
@media (max-width: 768px) {
  .user-guide-overlay {
    padding: 16px;
  }
  
  .user-guide-card {
    border-radius: 20px;
    max-height: 85vh;
  }
  
  .guide-header {
    padding: 20px 24px;
  }
  

  
  .guide-close-btn {
    width: 40px;
    height: 40px;
  }
  
  .guide-content {
    padding: 24px;
  }
  
  .guide-section {
    padding: 20px;
    margin-bottom: 24px;
  }
  
  .guide-section-title {
    font-size: 26px;
  }
  
  .guide-item {
    font-size: 26px;
  }
  
  .guide-footer-text {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .user-guide-overlay {
    padding: 12px;
  }
  
  .user-guide-card {
    border-radius: 16px;
    max-height: 90vh;
  }
  
  .guide-header {
    padding: 16px 20px;
  }
  
  
  .guide-close-btn {
    width: 36px;
    height: 36px;
  }
  
  .guide-content {
    padding: 20px;
  }
  
  .guide-section {
    padding: 16px;
    margin-bottom: 20px;
  }
  
  .guide-section-title {
    font-size: 26px;
  }
  
  .guide-item {
    font-size: 26px;
  }
  
  .guide-footer {
    padding: 16px;
  }
  
  .guide-footer-text {
    font-size: 26px;
  }
}

/* 暗色模式支持 - 用户指南 */
@media (prefers-color-scheme: dark) {
  .user-guide-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba($primary-color, 0.3);
  }
  
  .guide-title {
    color: #f1f5f9;
  }
  
  .guide-section {
    background: rgba($primary-color, 0.1);
    
    &:hover {
      background: rgba($primary-color, 0.15);
    }
  }
  
  .guide-section-title {
    color: #f1f5f9;
  }
  
  .guide-item {
    color: #94a3b8;
  }
  
  .guide-footer {
    background: linear-gradient(135deg, rgba($secondary-color, 0.2), rgba($primary-color, 0.2));
    border-color: rgba($primary-color, 0.3);
  }
  
  .guide-footer-text {
    color: $primary-light;
  }
}

/* 总食材卡片点击效果 */
.stat-card.total {
  cursor: pointer;
  
  &:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: $shadow-xl;
    border-color: rgba($primary-color, 0.3);
    
    .stat-icon {
      transform: scale(1.1);
      background: rgba($primary-color, 0.2);
    }
    
    .stat-value {
      color: $primary-dark;
    }
  }
  
  &:active {
    transform: translateY(-2px) scale(1.01);
  }
}

/* 需关注卡片点击效果 */
.stat-card.consumption {
  cursor: pointer;
  
  &:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: $shadow-xl;
    border-color: rgba($success-color, 0.3);
    
    .stat-icon {
      transform: scale(1.1);
      background: rgba($success-color, 0.2);
    }
    
    .stat-value {
      color: $success-color;
    }
  }
  
  &:active {
    transform: translateY(-2px) scale(1.01);
  }
}

/* 暗色模式下的总食材模态框样式 */
@media (prefers-color-scheme: dark) {
  .total-ingredients-header {
    background: linear-gradient(135deg, rgba($primary-color, 0.1), rgba($secondary-color, 0.1));
    border-bottom-color: rgba(148, 163, 184, 0.2);
  }
  
  .total-count {
    color: $primary-light;
  }
  
  .total-description {
    color: #94a3b8;
  }
  
  .ingredient-item {
    .option-name {
      color: #f1f5f9 !important;
    }
    
    .option-category {
      color: #94a3b8 !important;
    }
    
    &:hover {
      background: rgba($primary-color, 0.1);
      
      .option-name {
        color: $primary-light !important;
      }
    }
  }
}
